package com.patter.demo.interpreter;

/**
 * @Author create by xcb 2023/1/31 11:08
 */
public class TerminalExpression implements Expression {
    private final String data;

    public TerminalExpression(String data) {
        this.data = data;
    }

    @Override
    public boolean interpret(String context) {
        return context.contains(data);
    }
}
